import { useState, useEffect } from 'react'
import { Button } from 'tdesign-react'

import styles from './index.module.less'

const SortNavigate = (props: any) => {
  const { onSortChange, options } = props

  const [state, setState] = useState({})

  useEffect(() => {

  }, [state])

  return <div className={`${styles.sortNavigate}`}>
      {options.map((item: any, index: any) => (
        <Button className={styles.button} key={index} onClick={()=>{onSortChange(item)}}>{item.label}</Button>
      ))}
  </div>
}

export default SortNavigate
